import axios from 'axios';
import service from '../request/';

const controller = "produ"

/**
* 
*分页
 @param {*} data 
* @returns 
*/
function query(data: any) {
    return service({
        method: 'get',
        url: controller + '/query',
        params: data,
    })
}
/*
修改
*/
function Update(data: any) {
    return service({
        method: 'Put',
        url: controller+'/update',
        data: data,
    })
}
/**
* 查找单个
* @param {*} data 
* @returns 
*/
function get(data: any) {
    return service({
        method: 'get',
        url: controller + '/get',
        params: data,

    })
}

/**
* 删除
* @param {*} data 
* @returns 
*/
function del(data: any) {
    return service({
        method: 'delete',
        url: controller,
        params: data,

    })
}
/*
添加
*/
function Add(data: any) {
    return service({
        method: 'post',
        url: controller+'/add',
        data: data,
    })
}
export default {
    query,
    del,
    get,
    Update,
    Add
}